﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Base.DataAccess.Common;

namespace Base.Business
{
    public class MenuBLL
    {
        private readonly MenuDAL menuDal = new MenuDAL();

        public DataTable GetAllMenu(string Language)
        {
            return menuDal.GetAllMenu(Language);
        }

        public DataSet GetMenu(string Language, int PageSize, int PageIndex, string Sort, string Dir, Guid ParentId)
        {
            return menuDal.GetMenu(Language, PageSize, PageIndex, Sort, Dir, ParentId);
        }

        public bool AddMenu(string Language, string Name, string LinkURL, Guid ParentId, string Description, int IsMenu, int IsDisplay)
        {
            return menuDal.AddMenu(Language, Name, LinkURL, ParentId, Description, IsMenu, IsDisplay);
        }

        public void MoveMenu(Guid Id, int Type)
        {
            menuDal.MoveMenu(Id, Type);
        }

        public int DeleteMenu(Guid Id)
        {
            return menuDal.DeleteMenu(Id);
        }

        public DataTable GetMenuById(Guid Id, string Language)
        {
            return menuDal.GetMenuById(Id, Language);
        }

        public bool UpdateMenu(string Language, Guid Id, string Name, string LinkURL, string Description, int IsMenu, int IsDisplay)
        {
            return menuDal.UpdateMenu(Language, Id, Name, LinkURL, Description, IsMenu, IsDisplay);
        }
    }
}
